﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MainAdmin.Master"
    CodeBehind="AdminBookLocation.aspx.vb" Inherits="QLThuVien.AdminBookLocation" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
    function loadingPanel(s, e) {
        lpanel.Show();
    }
    function hide_ke() {
        var seconds = 4;
        setTimeout(function () {
            document.getElementById('successDivKe').style.display = "none";
        }, seconds * 1000);
    }
    function hide_xoake() {
        var seconds = 4;
        setTimeout(function () {
            document.getElementById('successXoaDivKe').style.display = "none";
        }, seconds * 1000);
    }


</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
        <div class="col-md-12">
            <h1 class="page-header">
                Xem - Chuyển
            </h1>
        </div>
    </div>
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Kệ - Hàng
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                    <div class="form-group">
                                        <label>
                                            Số Kệ</label>
                                        <dx:ASPxComboBox ID="cb_soke" runat="server" ValueType="System.String" TextField="ke" 
                                            ValueField="ke" CssClass="form-control" NullText="Chọn Số Kệ..."  AutoPostBack="true">
                                        </dx:ASPxComboBox>
                               
                                    </div>
                                       <div class="form-inline">
                                <button id="bt_themvitri"  type="button" class="btn btn-primary btn-circle" clientidmode="Static" ><i class="fa fa-plus"></i>
                                </button> 
                                 <button id="bt_xoavitri" runat="server" onserverclick="bt_xoavitri_Click"   type="button" disabled="true" class="btn btn-danger btn-circle" clientidmode="Static" ><i class="fa fa-times"></i>
                                </button> 
                                          
                                </div> 
                               
                                <div class="alert alert-success" style="margin-top:10px"  runat="server" id="successXoaDivKe" visible="false" clientidmode="Static">
                                                            <dx:ASPxLabel ID="lb_messxoake" runat="server" Font-Bold="true">
                                                            </dx:ASPxLabel>
                                                            </div>   
                                   
                                                  
                             </div>
                         
                                   
                                    
                             
                                <div class="col-lg-6">
                                    <div class="form-group">
                                        <label>
                                            Số Hàng</label>
                                        <dx:ASPxListBox ID="listbox_hang" runat="server" ValueType="System.String" Theme="MetropolisBlue" 
                                            Enabled="false" SelectionMode="Single" Width="100%" Height="115px" CheckBoxFocusedStyle-BackColor="AliceBlue"
                                            AutoPostBack="true">
                                            <Items>
                                                <dx:ListEditItem Text="Hàng 1" Value="H-1" />
                                                <dx:ListEditItem Text="Hàng 2" Value="H-2" />
                                                <dx:ListEditItem Text="Hàng 3" Value="H-3" />
                                                <dx:ListEditItem Text="Hàng 4" Value="H-4" />
                                                <dx:ListEditItem Text="Hàng 5" Value="H-5" />
                                            </Items>
                                          <ClientSideEvents SelectedIndexChanged="loadingPanel" />
                                          <SettingsLoadingPanel Enabled="true" />
                                        </dx:ASPxListBox>
                                        <dx:ASPxLoadingPanel ID="lpanel" runat="server" ClientInstanceName="lpanel" Modal="true"  ContainerElementID="container" VerticalAlign="Middle"  >
                                        </dx:ASPxLoadingPanel>
                                    </div>
                                </div>
                            </div>
                        </div>
                       
                        <div class="panel-heading">
                            Danh Sách 
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div id="container">
                                    <dx:ASPxNewsControl ID="data_sach" runat="server" Width="100%" DateField="ngaynhap"
                                        TextField="chitiet" Border-BorderStyle="None" ImageUrlField="hinh" HeaderTextField="tensach"
                                        NameField="id_sach" ClientInstanceName="data_sach" Theme="MetropolisBlue" 
                                        RowPerPage="5" >
                                        <ItemSettings ShowImageAsLink="True" MaxLength="30" TailText="Chuyển Vị Trí" DateHorizontalPosition="OutsideRight" />
                                        <ItemImage Width="100px" Height="100px">
                                        </ItemImage>
                                        <ItemHeaderStyle Font-Bold="true" ForeColor="OrangeRed">
                                        </ItemHeaderStyle>
                                        <ItemDateStyle ForeColor="GrayText" Font-Size="Small" BackColor="AliceBlue">
                                        </ItemDateStyle>
                                        <PagerSettings   Visible="true" PageSizeItemSettings-Items="5,10,15,20" PageSizeItemSettings-Visible="true" PageSizeItemSettings-Position="Left" Position="TopAndBottom" LastPageButton-Image-IconID="arrows_last_32x32office2013" LastPageButton-ShowDefaultText="false"  
                                         LastPageButton-Visible="true" FirstPageButton-Image-IconID="arrows_first_32x32office2013"  FirstPageButton-ShowDefaultText="false"   FirstPageButton-Visible="true" 
                                         NextPageButton-Visible="true" NextPageButton-Image-IconID="arrows_next_32x32office2013" NextPageButton-ShowDefaultText="false"  PrevPageButton-Image-IconID="arrows_prev_32x32office2013" PrevPageButton-Visible="true"  PrevPageButton-ShowDefaultText="true" ></PagerSettings> 
                                    </dx:ASPxNewsControl>
                                    <dx:ASPxPopupControl ID="pc_details" runat="server" PopupHorizontalAlign="WindowCenter" 
                                        ShowPageScrollbarWhenModal="True" PopupVerticalAlign="WindowCenter"
                                        ClientInstanceName="pc_details"  Width="400px" Height="300px"   
                                        EnableViewState="False" Modal="True"    >                                      
                                    </dx:ASPxPopupControl>
                                     <dx:ASPxPopupControl ID="pc_vitri"  runat="server" AllowDragging="True" CloseAction="CloseButton" 
                     PopupElementID="bt_themvitri" EnableViewState="False" 
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" Width="400px" CloseAnimationType="Fade" 
                    PopupAnimationType="None" ClientInstanceName="popup_info" Height="100px" HeaderText="Thêm Kệ Sách" ShowShadow="true"
                    CloseOnEscape="True" EnableTheming="True" Modal="True" Theme="MetropolisBlue">
                    <ContentCollection>
                    <dx:PopupControlContentControl>
          
                                    <div class="form-group">
                                        <label>Nhập Mã Kệ</label>
                                        <div class="form-group input-group">
                                            <span class="input-group-addon">K
                                            </span>
                                            <dx:ASPxTextBox ID="tb_tenke" runat="server" CssClass="form-control" NullText="A1,B2,C3,..." HelpTextSettings-DisplayMode="Popup" HelpText="(Lưu ý: Mỗi kệ sẽ có 5 hàng)">
<HelpTextSettings DisplayMode="Popup"></HelpTextSettings>

                                            <ValidationSettings ErrorTextPosition="Right" ValidationGroup="ke" SetFocusOnError="True" >
                                                <RequiredField IsRequired="True" ErrorText="Chưa Nhập Mã Kệ" />  
                                            </ValidationSettings>
                                            </dx:ASPxTextBox>
                                        </div>
                                        <div>
                                            <dx:ASPxButton ID="bt_xacnhanke" runat="server" Text="Xác Nhận" CssClass="form-control btn btn-primary" ValidationGroup="ke">
                                            <ClientSideEvents Click="function(s,e){hide_ke()}"/>
                                            </dx:ASPxButton>
                                        </div>
                                          <div class="alert alert-success" style="margin-top:10px" runat="server" id="successDivKe" visible="false" clientidmode="Static">
                                                            <dx:ASPxLabel ID="lbl_messke" runat="server" Font-Bold="true">
                                                            </dx:ASPxLabel>
                             </div>      
                                    </div>
                    </dx:PopupControlContentControl>
                    </ContentCollection>
        </dx:ASPxPopupControl>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
       
        </ContentTemplate>
    </asp:UpdatePanel>
     
</asp:Content>
